package com.ms.service.module.commonsettings;

import com.ms.game.gmtool.PurchasePlatformType;


/**
 * 儲值上限設定
 * @author TW16028
 *
 */
public class CommonPurchaseLimitSetting {
	
	/**
	 * 金額無限
	 */
	public static final double UNLIMIT_MONEY = -1;
	
	private double googlePlay;

	private double appStore;

	public double getGooglePlay() {
		return googlePlay;
	}

	public void setGooglePlay(double googlePlay) {
		this.googlePlay = googlePlay;
	}

	public double getAppStore() {
		return appStore;
	}

	public void setAppStore(double appStore) {
		this.appStore = appStore;
	}
	
	/**
	 * 用購買平台判斷對應的限制金額
	 * @param platformType
	 * @return
	 */
	public double getPurchaseLimitByPlatForm(PurchasePlatformType platformType){
		double limit = 0;
		switch (platformType) {
		case APPSTORE:
			limit = appStore;
			break;
		case GOOGLEPLAY:
			limit = googlePlay;
			break;
		default:
			limit = 0;
			break;
		}
		return limit;
	}
}
